ActiveAdmin.register Report do
  actions :index

  index do
    column :usage
    column :name
    column :path do |report|
      if File.exist?(report.path)
        link_to("下载", report.path.gsub("#{Rails.public_path}", ''))
      else
        status_tag('制作中', class: :red)
      end
    end
    column :created_at
  end
end
